* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #222;

}

.loading {
    position: relative;
    width: 150px;
    height: 150px;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top-color: #9370db;
    animation: rotate 2s linear infinite;
}

.loading::before {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: 5px;
    left: 5px;
    /* 用伪元素做边框 */
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ba55d3;
    animation: rotate 3s linear infinite;
}

.loading::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f0f;
    animation: rotate 1.5s linear infinite;
}

/* 定义动画 */
@keyframes rotate {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}
